home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Tutorial Material
/
Zone Tutorial
/
Structure Examples
/
5. Struct3c
< prev
next >
Wrap
Lisp/Scheme
|
1998-10-26
|
1KB
|
53 lines
; STRUCT3C - structure study (melody-led)
(setq tonal (activate-tonality (dorian c 4) (pentatonic b& 3)))
(setq mel1 (gen-loop '((1 4 2) (5 6 4) (1 6 3))
'(a b c d a b)))
(setq mel2 (gen-fibonacci 5 '(a b c d) '(a d c b)))
; Nigel has been using tick value 96 for 1/4 note.
; Because Nigel often mixes ticks and ratios, the function must take
; both cases into account.
(defun use-nigel-ticks (l)
(let (out)
(dolist (x l)
(if (is-length-symbol x)
(push x out)
(push (* x 5) out)))
(nreverse out)))
(setq rhy1 (use-nigel-ticks (fill-template mel1 '(24 24 -24 24 -48 48))))
(setq rhy2 (use-nigel-ticks (fill-template mel2 '(24 24 48 96 -24 24 48))))
(setq zone1 (list (make-zone rhy1)))
(setq zone2 (list (make-zone rhy2)))
(setq zones (append zone1 zone2 zone1))
(setq rhys (append rhy1 rhy2 rhy1))
(setq mels (append mel1 mel2 mel1))
(def-symbol
bass mels
)
(def-length
bass rhys
)
(def-zone
bass zones
)
(def-tonality
bass tonal
)
(compile-instrument-p "ccl;output:" "struct3c"
bass
)